-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TS migration] Migrate 'Composer.stories.js', 'DragAndDrop.stories.js', 'Form.stories.js' and 'RadioButtonWithLabel.stories.js' stories to TypeScript #37820
Conversation
multiline | ||
onChangeText={setComment} | ||
onPasteFile={setPastedFile} | ||
style={[defaultStyles.textInputCompose, defaultStyles.w100, defaultStyles.verticalAlignTop]} | ||
/> | ||
</View> | ||
<View style={[defaultStyles.flexRow, defaultStyles.mv5, defaultStyles.flexWrap, defaultStyles.w100]}> | ||
<View | ||
style={[defaultStyles.border, defaultStyles.noLeftBorderRadius, defaultStyles.noRightBorderRadius, defaultStyles.p5, defaultStyles.flex1]} | ||
id={CONST.REPORT.DROP_NATIVE_ID} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DROP_NATIVE_ID
doesn't exist in CONST.REPORT
src/stories/Form.stories.tsx
Outdated
if (args.formState?.error) { | ||
FormActions.setErrors(args.formID, {error: args.formState.error as MaybePhraseKey}); | ||
} else { | ||
FormActions.clearErrors(args.formID); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, this method FormActions.setErrors(args.formID, args.formState.error);
was used for both setting and clearing error. But that approach wasn't aligned with our current typing.
src/stories/Form.stories.tsx
Outdated
if (args.formState?.error) { | ||
FormActions.setErrors(args.formID, {error: args.formState.error as MaybePhraseKey}); | ||
} else { | ||
FormActions.clearErrors(args.formID); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this comment
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
This doesn't require QA, right? How about adding [No QA] to the title? |
@@ -8,7 +8,7 @@ type DragAndDropProviderProps = { | |||
isDisabled?: boolean; | |||
|
|||
/** Indicate that users are dragging file or not */ | |||
setIsDraggingOver: (value: boolean) => void; | |||
setIsDraggingOver?: (value: boolean) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this should be optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blazejkustra Yep, it's already so on the main. Report screen uses DragAndDropProvider
without setIsDraggingOver
as well.
@blazejkustra It's possible to test it and I've specified test steps, but I'm okay to mark it as No QA if there is an agreement for stories as well 👌 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25355 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NikkiWines looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
tests were definitely passing when I merged 🤔 |
🚀 Deployed to staging by https://github.com/NikkiWines in version: 1.4.52-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.52-6 🚀
|
Details
[TS migration] Migrate 'Composer.stories.js', 'DragAndDrop.stories.js', 'Form.stories.js' and 'RadioButtonWithLabel.stories.js' stories to TypeScript
Fixed Issues
$ #25355
$ #25356
$ #25357
$ #32036
PROPOSAL: N/A
Tests
DragAndDrop
story. Drop an image to the drop area, make sure it works as before.RadioButtonWithLabel
story. Make sure checked/unchecked radio button looks ok.Composer
story. Make sure it looks the same way as before.Form
story. Looks through forms and make sure they look and works as before.5.1
Default
form - mark Terms and Conditions checkbox and press Submit button. Popup with submitted info should appear in a couple of seconds.5.2
Input Error
- press Submit button - whole form should be in different validation errors.5.3
Loading
- loading indicator should be shown instead of Submit button.5.4
Server Error
- error message should display above Submit button5.5
With Native Event Handler
- input values, they also should display below inputOffline tests
N/A
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Composer
DragAndDrop
DragAndDrop.mp4
Form
form.mp4
RadioButtonWithLabel